package com.bwie.controller;

import com.bwie.pojo.Appointment;
import com.bwie.service.AppointmentService;
import com.bwie.service.PackageService;

import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lenovo
 * 套餐预约
 */
@RestController
@RequestMapping("/package")
public class PackageController {

    @Autowired
    private PackageService packageService;

    @Autowired
    private AppointmentService appointmentService;

    @PostMapping("/list")
    public R list(@RequestBody PageInfoVo pageInfoVo){
        return packageService.packageList(pageInfoVo);
    }

    @PostMapping("/appointment")
    public R appointment(@RequestBody Appointment appointment){
        return appointmentService.appointment(appointment);
    }

}
